package smb.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingTarget;
import smb.domain.Score;
import smb.vo.ScoreVo;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ScoreMapper {
    ScoreVo scoreToScoreVo(Score score);
    List<ScoreVo> scoresToScoreVos(List<Score> scores);
    @Mapping(target = "student", ignore = true)
    @Mapping(target = "section", ignore = true)
    @Mapping(target = "id", ignore = true)
    void updateScore(ScoreVo scoreVo, @MappingTarget Score score);
}
